package cn.buk.tms.entity.misc;

import cn.buk.tms.entity.base.BaseInfo;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;

/**
 * BSP开票时，需要用到的旅游代码（也可以说是大客户代码）
 */
@Entity
@Table(name = "pnr_tour_code", uniqueConstraints = @UniqueConstraint(name = "uk_pnr_tour_code", columnNames = {"enterprise_id", "carrier"}))
public class PnrTourCode extends BaseInfo {


  @Column(length = 2)
  private String carrier;

  /**
   * 旅游代码（大客户代码, 出票时用TC指令保存到编码中）
   */
  @Column(name = "tour_code", length = 20)
  private String tourCode;

  /**
   * PAT:A 时的代码
   */
  @Column(name = "pat_code", length = 20)
  private String patCode;

  /**
   * 出票类型：
   * 0/null: BSP
   * 1：德付通
   */
  @Column(name = "ticket_type")
  private Integer ticketType;

  /**
   * 德付通密码
   */
  @Column(name = "dpay_password")
  private String dpayPassword;

  @Column(name = "dpay_amount")
  private Integer dpayAmount = 0;

  @Column(name = "min_dpay_amount")
  private Integer minDpayAmount = 0;

  /**
   * 0 - 停用
   * 1 - 启用
   */
  private int status;





  public int getStatus() {
    return status;
  }

  public void setStatus(int status) {
    this.status = status;
  }

  public String getTourCode() {
    return tourCode == null ? "" : tourCode.trim();
  }

  public void setTourCode(String tourCode) {
    this.tourCode = tourCode;
  }

  public String getCarrier() {
    return carrier;
  }

  public void setCarrier(String carrier) {
    this.carrier = carrier;
  }

  public String getPatCode() {
    return patCode == null ? "" : patCode.trim();
  }

  public void setPatCode(String patCode) {
    this.patCode = patCode;
  }

  public int getTicketType() {
    return ticketType == null ? 0 : ticketType;
  }

  public void setTicketType(Integer ticketType) {
    this.ticketType = ticketType;
  }

  public String getDpayPassword() {
    return dpayPassword == null ? "" : dpayPassword.trim();
  }

  public void setDpayPassword(String dpayPassword) {
    this.dpayPassword = dpayPassword;
  }


  /**
   * 最低余额（德付通）
   */
  public Integer getMinDpayAmount() {
    return minDpayAmount;
  }

  public void setMinDpayAmount(Integer minDpayAmount) {
    this.minDpayAmount = minDpayAmount;
  }

  /**
   * 德付通资金余额
   */
  public Integer getDpayAmount() {
    return dpayAmount;
  }

  public void setDpayAmount(Integer dpayAmount) {
    this.dpayAmount = dpayAmount;
  }
}
